import {defineStore} from "pinia";

export const useMemberStore = defineStore("members", {
    state: ():State => {
        return {
            id: 0,
            isVip: false,
            name: "",
            avatar:'',
        }
    },
    getters: {
        headerImg: (state:State):string => {
            return state.avatar? state.avatar : 'https://sxb.szhuitianxia.com/upload/4c/b94ed1f8b254bac4e00057be30897f.png';
        }
    }
});

interface State {
    id: number,
    name: string,
    isVip: boolean,
    avatar: string,
}